<template>
	<view class="query-content">
		<view class="query-head">
			查询中心
		</view>
		<!-- <view class="query-nav">
			<view class="query-nav-box wdcg">
				<view class="nav-box-title">
					采购
				</view>
				<view class="nav-box-money wdcg-color">
					<text class="">{{cgMoney}}</text><text class="money-unit">/万元</text>
				</view>
				<view class="nav-box-num wdcg-color wdcg-colorBg">
					{{cgAmount}}/个
				</view>
			</view>
			<view class="query-nav-box wdht">
				<view class="nav-box-title">
					采购执行
				</view>
				<view class="nav-box-money wdht-color">
					<text class="">{{zxMoney}}</text><text class="money-unit">/万元</text>
				</view>
				<view class="nav-box-num wdht-color wdht-colorBg">
					{{zxAmount}}/个
				</view>
			</view>
			<view class="query-nav-box wdzc">
				<view class="nav-box-title">
					合同文本
				</view>
				<view class="nav-box-money wdzc-color">
					<text class="">{{htMoney}}</text><text class="money-unit">/万元</text>
				</view>
				<view class="nav-box-num wdzc-color wdzc-colorBg">
					{{htAmount}}/个
				</view>
			</view>
		</view> -->
		<view class="query-module">
			<nav-module :data='cglist'></nav-module>
			<!-- <nav-module :data='gdlist'></nav-module> -->
		</view>
	</view>
</template>

<script>
	import navModule from '../component/nav-module.vue'
	import {getMyEntityInfo} from '../../api/service.js'
	export default {
		name: 'querModule',
		components: {
			navModule
		},
		data() {
			return {
				cglist: {
					// name: '采购业务',
					list: [
					// {
					// 	navName: '合同付款',
					// 	imageUrl: '../../static/Qicon/htfk_icon.png',
					// 	directUrl: '',
					// 	width: '34rpx',
					// 	height: '36rpx'
					// }, 
					// {
					// 	navName: '合同备案',
					// 	imageUrl: '../../static/Qicon/htwb_icon.png',
					// 	directUrl: '',
					// 	width: '36rpx',
					// 	height: '38rpx'
					// }, 
					
					{
						navName: '我的合同',
						imageUrl: '../../static/Qicon/htys_icon.png',
					    directUrl: '../component/query/queryContract?type=accept',
						width: '34rpx',
						height: '36rpx'
					},
					]
				},
				gdlist: {
                   name: '资产业务',
				  list:[ {
				   	navName: '资产入固',
				   	imageUrl: '../../static/Qicon/zcrg_icon.png',
				   	directUrl: '',
				   	width: '36rpx',
				   	height: '32rpx'
				   }, 
				   {
				   	navName: '资产调拨',
				   	imageUrl: '../../static/Qicon/zcdb_icon.png',
				   	directUrl: '',
				   	width: '34rpx',
				   	height: '34rpx'
				   },
				   {
				   	navName: '资产修改',
				   	imageUrl: '../../static/Qicon/zcxg_icon.png',
				   	directUrl: '',
				   	width: '32rpx',
				   	height: '36rpx'
				   }, 
				   {
				   	navName: '资产处置',
				   	imageUrl: '../../static/Qicon/zcxz_icon.png',
				   	directUrl: '',
				   	width: '38rpx',
				   	height: '34rpx'
				   }
				   ]
				},
				cgAmount:0,
				cgMoney: 0,
				htAmount: 0,
				htMoney:0,
				zxAmount: 0,
				zxMoney: 0,
				
			}
		},
		created() {
			this.queryMyEntityInfo()
		},
		methods:{
			queryMyEntityInfo(){
				getMyEntityInfo({}).then(res=>{
					if(res.success){
						this.cgAmount=res.result.cgAmount
						this.cgMoney= res.result.cgMoney
						this.htAmount= res.result.htAmount
						this.htMoney=res.result.htMoney
						this.zxAmount=res.result.zxAmount
						this.zxMoney= res.result.zxMoney
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.query-content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		position: relative;
	}

	.query-head {
		height: 168rpx;
		flex: 1;
		padding-top: 26rpx;
		font-size: 36rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: rgba(255, 255, 255, 1);
		line-height: 50rpx;
		text-align: center;
		margin-bottom: 136rpx;
		background: linear-gradient(135deg, rgba(255, 170, 255, 1.0) 0%, rgba(100, 62, 224, 1.0) 100%);
	}

	.query-nav {
		display: flex;
		width: 100%;
		left: 0;
		position: absolute;
		height: 220rpx;
		top: 84rpx;
		z-index: 5;
		// flex: 1;
		flex-direction: row;
		justify-content: center;
		padding: 0 10rpx;

		.query-nav-box {
			width: 246rpx;
			flex: 1;
			height: 220rpx;
			align-content: space-between;
			padding: 26rpx 10rpx 10rpx 28rpx;

			.nav-box-title {
				height: 40rpx;
				font-size: 26rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: rgba(51, 51, 51, 1);
				line-height: 36rpx;
				flex: 1;
				margin-bottom: 8rpx;
			}

			.nav-box-money {
				// height:44rpx;
				flex: 1;
				font-size: 32rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				margin-bottom: 12rpx;
				line-height: 32rpx;

				.money-unit {
					font-size: 22rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;

				}
			}

			.nav-box-num {
				width: 110rpx;
				height: 38rpx;
				border-radius: 16rpx;
				padding: 4rpx 8rpx;
				line-height: 34rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;

			}
		}
	}

	.wdcg-color {
		color: rgba(249, 152, 61, 1);
	}

	.wdcg-colorBg {
		background: rgba(249, 152, 61, 0.36);
	}

	.wdht-color {
		color: rgba(55, 175, 227, 1);
	}

	.wdht-colorBg {
		background: rgba(55, 175, 227, 0.36)
	}

	.wdzc-color {
		color: rgba(120, 122, 239, 1);
	}

	.wdzc-colorBg {
		background: rgba(120, 122, 239, 0.36)
	}

	.query-module {
		display: flex;
		padding: 10rpx 22rpx;
		flex-direction: column;
		margin-top: -140rpx;
	}
</style>
